<?php

(defined('BASEPATH')) OR exit('No direct script access allowed');

class MY_URI extends CI_URI {

    /**
     * Generate a URI string from an associative array
     *
     *
     * @access	public
     * @param	array	an associative array of key/values
     * @return	array
     */
    function assoc_to_uri($array) {
        $temp = array();
        foreach ((array) $array as $key => $val) {
            if($val != null && $key != ''){
                $temp[] = $key;
                $temp[] = $val;
            }
        }

        return implode('/', $temp);
    }

}